package com.woke.diyview;

import com.example.woke.PswchangeActivity;
import com.example.woke1.CaixintongActivity;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.View;

public class Alertdialogall {
	public AlertDialog alertDialog;
	
	public AlertDialog aralogid(final Activity activity,String info,String kll){
		   alertDialog = new AlertDialog.Builder(activity).setTitle(info). 
	                setMessage(kll). 
//	                setIcon(R.drawable.ic_launcher). 
	                setPositiveButton("确定", new DialogInterface.OnClickListener() { 
	                    @Override 
	                    public void onClick(DialogInterface dialog, int which) { 
	                    Intent intent = new Intent();
	                    		intent.setClass(activity, PswchangeActivity.class);
	                    		intent.putExtra("name", 0);
	                    		activity.startActivity(intent);
	                    		alertDialog.dismiss();
	                    } 
	                }). 
	                setNegativeButton("取消",new DialogInterface.OnClickListener() { 
	                    @Override 
	                    public void onClick(DialogInterface dialog, int which) { 
	                    	alertDialog.dismiss();
	                        // TODO Auto-generated method stub  
	                    } 
	                }).create(); 
	        alertDialog.show();
			return alertDialog; 
	}
	
	
}
